<%@ page import="cn.school.service.GradeService" %>
<%@ page import="cn.school.entity.Grade" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: ghost
  Date: 2019/12/5
  Time: 23:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form action="register.jsp" method="get">
    <table cellpadding="10">
        <tr><td>姓名：</td><td><input type="text" name="sname" required></td></tr>
        <tr><td>性别：</td><td><input type="text" name="sex" required></td></tr>
        <tr><td>电话号码：</td><td><input type="text" name="telephone"></td></tr>
        <tr><td>qq：</td><td><input type="text" name="qq"></td></tr>
        <tr><td>微信：</td><td><input type="text" name="wechat"></td></tr>
        <tr><td>年级：</td><td>
            <select name="gradeid">
                <%
                    GradeService gs = new GradeService();
                    List<Grade> list = gs.findAll();
                    for(Grade g:list){
                %>
                <option value="<%=g.getId()%>"><%=g.getGname()%></option>
                <% }%>
            </select>
        </td></tr>
        <tr><td>籍贯：</td><td><input type="text" name="fromcity"></td></tr>
        <tr><td>出生日期：</td><td><input type="date" name="birthday"></td></tr>
        <tr><td>现居地：</td><td><input type="text" name="address"></td></tr>
        <tr><td>登录密码：</td><td><input type="password" name="pass" required></td></tr>
        <tr><td><input type="submit" value="添加"></td></tr>
    </table>
</form>
</body>
</html>
